$objWMIServ=GetObject("winmgmts:\\.\root\CIMV2").ExecQuery("SELECT * FROM Win32_ComputerSystem", "WQL",48)
For Each $obj In $objWMIServ
$BootupState=$obj.BootupState
Next
$BootStat=$BootupState
$BootupState=left(ucase($BootupState),6)
if ($BootupState="NORMAL")=0 $SafeMode="Y" endif
Else
$BootStat="Undetermined"
$SafeMode="U"
EndIf
cls
If ($SafeMode="Y")=1 and exist ("LPT$VPN.*")=1 goto SCAN endif
If ($SafeMode="Y")=1 and exist ("LPT$VPN.*")=0
if @inwin=1
BEEP
ShutDown ("","Trend Pattern File was not found. The computer is being shutdown so you can obtain the Pattern File in Normal Mode",30,1,1)
goto END
else
BEEP
messagebox("Trend Pattern File was not found. The computer is being shutdown so you can obtain the Pattern File in Normal Mode"," Trend Micro Sysclean ",48,30)
run "%windir%\RUNDLL32.EXE user.exe,ExitWindows"
goto END
endif
endif
gosub "GetFiles"
:SCAN
KillProcess()
CleanCache()
shell "$home\SYSCLEAN.COM"
if exist ("$home\SYSCLEAN.log")=1 run "notepad $home\SYSCLEAN.log" endif